FROM golang

# 设置必要的环境变量
ENV GO111MODULE=on \
    CGO_ENABLED=0 \
    GOOS=linux \
    GOARCH=amd64 \
    GOPROXY=https://goproxy.cn,direct

RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list && \
    sed -i 's/security.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list && \
    sed -i 's/security-cdn.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list

RUN apt-get update && apt-get install vim -y && apt-get install net-tools -y && apt-get install iputils-ping -y && apt-get install procps -y


USER root
# 个性化配置

#debian终端文件夹显示不同颜色
RUN sed -i "s/# export LS_OPTIONS='--color=auto'/export LS_OPTIONS='--color=auto'/" /root/.bashrc && \
    sed -i "s/# alias ls='ls \$LS_OPTIONS'/alias ls='ls \$LS_OPTIONS'/" /root/.bashrc && \
    sed -i "s/# alias ll='ls \$LS_OPTIONS -l'/alias ll='ls \$LS_OPTIONS -l'/" /root/.bashrc && \
    sed -i "s/# alias l='ls \$LS_OPTIONS -lA'/alias l='ls \$LS_OPTIONS -lA'/" /root/.bashrc && \
    sed -i "s/# alias rm='rm -i'/alias rm='rm -i'/" /root/.bashrc && \
    sed -i "s/# alias cp='cp -i'/alias cp='cp -i'/" /root/.bashrc && \
    sed -i "s/# alias mv='mv -i'/ alias mv='mv -i'/" /root/.bashrc && \
#debian终端文件显示不同颜色
    sed -i 's/"syntax on/syntax on/' /etc/vim/vimrc

WORKDIR $GOPATH/src
EXPOSE 8088
